package info.openlvb.openlvg.client.service;

import java.util.List;

import info.openlvb.openlvg.client.base.Account;
import info.openlvb.openlvg.client.base.Group;

import com.google.gwt.user.client.rpc.AsyncCallback;


public interface LdapServiceAsync {

	void login(String login, String password, AsyncCallback<Account> callback);

	void searchGroupByCn(String cn, AsyncCallback<Group> callback);

	void addGroup(Group group, AsyncCallback<Void> callback);
	
	void searchGroups(AsyncCallback<List<Group>> callback);

	void searchMembersByCnOfGroup(String cn,
			AsyncCallback<List<Account>> callback);

	void searchUsersUid(AsyncCallback<List<String>> callback);

	void searchAccountByUid(String uid, AsyncCallback<Account> callback);

	void removeUserInGroup(String cnOfGroup, String login,
			AsyncCallback<Void> callback);

	void addUserInGroup(String group, String userUid,
			AsyncCallback<Void> callback);

	void removeGroup(String group, AsyncCallback<Void> callback);

	void addUser(Account account, AsyncCallback<Void> callback);

	void modifyGroup(String oldcn, String newcn, String description,
			AsyncCallback<Void> callback);

	void searchUsers(AsyncCallback<List<Account>> callback);

}
